<meta charset="utf-8">
<div class="box box-primary" id="pmpDeduceLine_add" >
	<div class="box-body">
		<form role="form" id="pmpDeduceLine_add_form" >
			<div class="form-group">
				<label for="deduceName" class="control-label">扣分标准名称</label>
				<input type="text"  name="deduceName" v-model="pmpDeduceLine.deduceName" class="form-control" id="deduceName" required></input>
			</div>
			<div class="form-group">
				<label for="deduceScore" class="control-label">扣分数</label>
				<input type="number"  name="deduceScore" v-model="pmpDeduceLine.deduceScore" class="form-control" id="deduceScore" ></input>
			</div>
		</form>
       
		<div class="box-footer">
			<button type="button" class="btn btn-default" v-on:click="cancel">取消</button>
			<button type="button" class="btn btn-info pull-right" v-on:click="add">提交</button>
		</div>
	 </div>
	<script type="text/javascript">
		var news = new Vue({
					el : '#pmpDeduceLine_add',
					data : {
						pmpDeduceLine : {
							projectId: null,
							deduceName : null,
							deduceScore : null
						},
						bus : new Vue(),
					},
					mounted : function() {
						this.$data.pmpDeduceLine.projectId= zfesLayerEditDg.getLayerParam().projectId;
					},
					methods : {
						add : function() {
							if ($("#pmpDeduceLine_add_form").valid()) {
								var _this = this;
								var url = "/pmp/service/pm/pmpDeduceLine/createDeduceLine";
								zfesAjax.ajaxTodo(url,_this.$data.pmpDeduceLine,function(data) {
									alertSwal.successText(data.message);
									layer.close(layer.index);
								})
							}
						},
						cancel : function() {
							layer.close(layer.index);
						}
					}
				});
	</script>
</div>
